package com.game.grid;

import com.mcodesal.framework.GameView;

import android.app.Activity;
import android.os.Bundle;
import android.view.Window;
import android.view.WindowManager;

public class Main extends Activity {
	
	/** Constants */
	
	//game object extends view so this is where we are actually going to do the drawing and such.  Most game features will be under that class.
	private GameView mGLView;
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
        //forces the window to be full screen
        getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, 
                WindowManager.LayoutParams.FLAG_FULLSCREEN);
        //removes the title bar at the top
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        mGLView = new GameView(this);
        setContentView(mGLView);
    }
    
    @Override
    protected void onPause() {
    	super.onPause();
    	mGLView.onPause(); //Pauses GL rendering
    	((GameView)mGLView).doPause(); //Pauses updating
    }
    
    protected void onResume() {
    	super.onResume();
    	mGLView.onResume(); //Resumes GL rendering
    	((GameView)mGLView).doResume(); //Resumes updating
    }
    
}